package com.datoucai.api;

import com.datoucai.config.FeignConfig;
import com.datoucai.param.BaseResult;
import com.datoucai.param.CommentInfoEntity;
import com.datoucai.param.PageResultWrapper;
import com.datoucai.param.SimpleCommentDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "dtc-comment",configuration = FeignConfig.class)
public interface CommentFeignService {

    @GetMapping(value = "/comment/queryByUserId")
    PageResultWrapper<CommentInfoEntity> queryCommentByUserId(@RequestParam("userId") Integer userId,
                                                              @RequestParam("module") Integer module,
                                                              @RequestParam("pageNum") Integer pageNum,
                                                              @RequestParam("pageSize") Integer pageSize);

    @RequestMapping(value = "/comment/batch/query", method = RequestMethod.GET)
    BaseResult<List<SimpleCommentDto>> batchQueryCommentByResourceIds(@RequestParam("module") Integer module,
                                                                      @RequestParam("resourceIds") List<String> resourceIds
                                                                      );
}